//
//  WJS_PicScrollViewCell.m
//  CrazyWord
//
//  Created by shange1999 on 16/2/26.
//  Copyright © 2016年 shange1999. All rights reserved.
//

#import "WJS_PicScrollViewCell.h"

@interface WJS_PicScrollViewCell ()


@end

@implementation WJS_PicScrollViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self =[super initWithFrame:frame];
    if (self) {
        self.myImageView=[[UIImageView alloc]init];
        [self.contentView addSubview:self.myImageView];
    }
    return self;
}
-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
//    NSLog(@"--------------%f",self.frame.size.height);
    self.myImageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}

#pragma (5) 重写setting方法 ,目的是给轮播图赋值

-(void)setPicScrollModel:(WJS_PicScrollmodel *)PicScrollModel{
    if (_PicScrollModel!=PicScrollModel) {
        _PicScrollModel=PicScrollModel;
    }
    [_myImageView sd_setImageWithURL:[NSURL URLWithString:_PicScrollModel.picurl]];
}













/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
